package action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class UserAction {

    public String login(HttpServletRequest request, HttpServletResponse response){

        System.out.println("UserAction.login()");

        String username=request.getParameter("username");
        String password=request.getParameter("password");

        if("abc".equals(username)&&"123".equals(password)){
            return "success";
        }

        request.setAttribute("message","用户名或密码错误");
        return "fail";
    }

    public String regist(HttpServletRequest request, HttpServletResponse response){
        System.out.println("UserAction.regist()");
        return "ok";
    }


}
